public class test {
    public static void main(String[] args) {
        MyArraylist myArraylist = new MyArraylist();
        myArraylist.add(1);
        myArraylist.add(2);
        myArraylist.add(3);
        myArraylist.add(4);
        myArraylist.display();
        try{
            myArraylist.add(2,99 );
        }catch (PosIllegalEcception e){
            //打印出出现异常的位置
            e.printStackTrace();
        }
        myArraylist.display();
    }

}
